-- GENERATED SPELL FOR [Chillmere Oracle] --


function spell0_24461(pUnit, Event) --@Frost Nova,Self--
pUnit:FullCastSpellOnTarget(11831,pUnit)
pUnit:RegisterEvent('Sorts_24461', 8300, 1)
end

function spell1_24461(pUnit, Event) --@Hex of the Murloc,n/a--
pUnit:FullCastSpellOnTarget(49935,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24461', 3270, 1)
end

function spell2_24461(pUnit, Event) --@Ice Lance,n/a--
pUnit:FullCastSpellOnTarget(49906,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24461', 543, 1)
end

function Sorts_24461(pUnit, Event)
local choix_sorts_24461 = math.random(0, 2)
if choix_sorts_24461 == 0 then
pUnit:RegisterEvent('spell0_24461', 1, 1)
end
if choix_sorts_24461 == 1 then
pUnit:RegisterEvent('spell1_24461', 1, 1)
end
if choix_sorts_24461 == 2 then
pUnit:RegisterEvent('spell2_24461', 1, 1)
end
end

function mob24461_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_24461', math.random(1500, 3000), 1)
end

function mob24461_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob24461_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob24461_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(24461, 1, 'mob24461_Action')
RegisterUnitEvent(24461, 2, 'mob24461_Leave')
RegisterUnitEvent(24461, 3, 'mob24461_Kill')
RegisterUnitEvent(24461, 4, 'mob24461_Die')
